﻿using StructureMap;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shared.Mappers;
using Shared.Loggers;
using Shared.Cache;

namespace DI
{
    public class AdapterRegistry : Registry
    {
        public AdapterRegistry()
        {
            var config = AutoMapperConfig.CreateMapperConfiguration();
            var mapper = config.CreateMapper();
            For<IObjMapper>().Singleton().Use(new AutoMapperAdapter(mapper));

            For<ILogger>().Singleton().Use<NLogAdapter>();
            For<ICacheStorage>().Singleton().Use<MemoryCacheStorage>();
        }
    }
}
